package com.RKB.dao;

import com.RKB.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserDao {
    @Insert("insert into User values(null,#{realname},#{username},#{password})")
    public void addUser(User user);

    @Select("select * from User where username = #{username}")
    public List<User> findByUsername(User user);

    @Select("select * from User where username = #{username} and password = #{password}")
    public List<User> signUser(User user);
}
